package com.gph.saviorframework.echarts.test.gauge;

import com.gph.saviorframework.echarts.code.Tool;
import com.gph.saviorframework.echarts.data.Data;
import com.gph.saviorframework.echarts.series.Gauge;
import com.gph.saviorframework.echarts.series.gauge.Detail;
import com.gph.saviorframework.echarts.test.util.EnhancedOption;
import org.junit.Test;

public class GaugeTest1 {

    @Test
    public void test() {
        // 地址： http://echarts.baidu.com/doc/example/gauge1.html
        EnhancedOption option = new EnhancedOption();
        option.tooltip().formatter("{a} <br/>{b} : {c}%");
        option.toolbox().show(true).feature(Tool.mark, Tool.restore, Tool.saveAsImage);
        option.series(new Gauge("业务指标").detail(new Detail().formatter("{value}%")).data(new Data("完成率", 75)));
        option.exportToHtml("guage1.html");
        option.view();
    }
}
